A storage device with a NAND flash memory (hereinafter, referred to as a NAND memory) stores data in accordance with the number of electrons (the amount of charge) at the floating gate in the memory cell. The data may be read by the application of voltage (reading voltage) in accordance with the amount of charge. However, the amount of charge of the memory cell sometimes varies due to various factors. A variation in the amount of charge sometimes prevents the data from correctly being read when a predetermined reading voltage is applied. In light of the foregoing, a common storage device stores data after encoding the data with an error correcting code.